<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>我的简历 - 锐聘网</title>
<link href="<%=basePath %>/css/base.css" type="text/css" rel="stylesheet" />
<link href="<%=basePath %>/css/my_resume.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=basePath %>js/jquery-3.1.1.min.js"></script>
<meta content="大学生求职,大学生就业,大学生招聘,IT人才,IT人才招聘,大学生名企招聘,,大学生找工作,IT名企招聘，IT行业招聘，IT企业快速入职" name="keywords">
<meta content="锐聘专注于为企业提供高效的人力资源解决方案，同时面向IT类技术人才推出快速一站式免费就业服务。秉承QST青软实训人才服务理念，为数千家企业量身定做个性化、全程化的人才培养体系，同时帮助中高级人才铺设成功之路，为人才和企业架设起沟通之桥。" name="description">

</head>

<script type="text/javascript">

	function educationShow() {
		$("#educationAdd").slideToggle();
	}
	
	$(function(){
	
		var educationId = "";
	
		$(".save1").on("click",function(){
			
			var school = $("#school");
			var beginTime = $("#beginTime");
			var schooling = $("#schooling");
			var profession = $("#profession");
			if(school.val() == null || school.val() == ""){
				alert("毕业学院不能为空！");
				school.focus();
				return false;
			}
			
			$.ajax({
				
				url : "<%=basePath %>edu.do?type=add", //请求的url地址
				type : "POST", //请求方式
				dataType : "JSON", //服务器返回的数据类型
				data : {school:school.val(),beginTime:beginTime.val(),schooling:schooling.val(),profession:profession.val()}, //传递的参数
				success : function(data){ //返回成功的操作
					/* alert(data.code); */
					if(data.code == 0){
						var edushow = $("#educationShow");
						edushow.show(); //显示教育经历div
						edushow.empty(); //清空div下的所有子元素（不包含本身）							
						var s = "";
						var sum = 0;
						var str = "<ul><li class='tn-border-gray tn-border-bottom it-table-grid-header'><p class='tn-name'>毕业院校</p><p class='tn-date'>就读时间</p><p class='tn-degree'>学历</p><p class='tn-fieldofstudy'>专业</p></li>";
						$.each(data.eduList, function(index, obj){ //第一个表示集合的下表，第二个表示这个对象
							education_id = obj.education_id;
							var html = "<li class='tn-border-gray tn-border-bottom'>"+
									"<p class='tn-name' title='青软实训'>"+obj.school+"</p>"+
									"<input type='hidden' name='education_id' value='"+obj.education_id+"'></input>"+
									"<p class='tn-date'>"+obj.beginTime+"</p>"+
									"<p class='tn-degree' title=''>"+obj.schooling+"</p>"+
									"<p class='tn-fieldofstudy' title='软件工程'>"+obj.profession+"</p>"+
									"<span class='tn-actions'><a href='javascript:void(0)' class='tn-action tn-action-text-icon' onclick='modify(this)'><span class='tn-icon it-icon-modify'></span><span class='tn-action-text'>修改</span></a>"+					            	
									"<a href='javascript:void(0)' class='tn-action tn-action-text-icon tn-delete del'><span class='tn-icon it-icon-delete'></span><span class='tn-action-text'>删除</span></a></span></li>";
							s+=html;
							
						});
						var ul = "</ul>";
						var result = str+s+ul;
						$(result).appendTo(edushow);
						$("#educationAdd").hide();
					}
				},
				error : function(){ //请求失败要执行的操作
					alert("请求失败!");
				}
				
			});

		});
		
		$(".del").on("click",function(){
			
			$.ajax({
				
				url : "<%=basePath %>edu.do?type=del&education_id=educationId",
				type : "POST",
				dataType : "JSON",
				success : function(){
					alert("请求成功");
				},
				error : function(){
				
				}
				
			});
			
		});
	
	});
	
	function modify(obj){
		var li = $(obj).parent().parent();
		var p = li.children("p");
		var education_id = li.children("input").val();
		/* alert("父元素li的class属性值为:"+li.attr("class")+"\n父元素下面的p元素个数为:"+p.length+"个"+"\n即将修改第"+education_id+"(education_id)条记录"); */
		var html = "<li class='tn-border-gray tn-border-bottom'>"+
				"<p class='tn-name' title='青软实训'><input type='hidden' name='education_id' value='"+education_id+"'></p>"+
				"<p class='tn-date'><input type='text' name='school' value='"+$(p[0]).text()+"'></input></p>"+
				"<p class='tn-date'><input type='text' name='beginTime' value='"+$(p[1]).text()+"'></input></p>"+
				"<p class='tn-degree' title=''><input type='text' name='schooling' value='"+$(p[2]).text()+"'></input></p>"+
				"<p class='tn-fieldofstudy' title='软件工程'><input type='text' name='profession' value='"+$(p[3]).text()+"'></input></p>"+
				"<span class='tn-actions'><a href='javascript:void(0)' class='tn-action tn-action-text-icon' onclick='update(this)'><span class='tn-icon it-icon-modify'></span><span class='tn-action-text'>保存</span></a>"+					            	
				"<a href='javascript:void(0)' class='tn-action tn-action-text-icon tn-delete del'><span class='tn-icon it-icon-delete'></span><span class='tn-action-text'>删除</span></a></span></li>";
		$(li).after(html);
		$(li).remove();
	
	}
	
</script>

<body>
<jsp:include page="../top.jsp"></jsp:include>
<div class="resume_con">
	<!--tab设置-->
	<div class="user_operate">
		<ul style="float:left">
			<li><a href="resume.jsp" class="active">我的简历</a></li>
			<li><a href="jobApply.jsp">我的申请</a></li>
			<div class="clear"></div>
		</ul>
		<div class="clear"></div>
	</div>
    <!--主体部分-->
    <div class="resume_main">
    	<!--左边-->
	    <div class="resume_left">
			<div class="resume_title">
				<div style="float:left">基本信息</div>
				<c:if test="${resumeBasicInfo.basicInfoId != 0 }">
					<div class="btn"><a href="<%=basePath %>resume.do?type=update">修改</a></div>
				</c:if>
				<c:if test="${resumeBasicInfo.basicInfoId == 0 }">
					<div class="btn"><a href="<%=basePath %>applicant/resumeBasicInfoAdd.jsp">添加</a></div>
				</c:if>
			</div>
			<c:if test="${resumeBasicInfo.basicInfoId != 0 }">
				<div class="all_resume">
					<div class="table_style">
						<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
						  <tr>
						    <th width="110" align="right" bgcolor="#F8F8F8">姓名：</th>
						    <td bgcolor="#F8F8F8" class="realName">${resumeBasicInfo.realName}</td>
						  </tr>
						</table>
						<div class="he"></div>
						<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
						  <tr>
						    <th width="110" align="right" bgcolor="#F8F8F8">性别：</th>
						    <td bgcolor="#F8F8F8">${resumeBasicInfo.gender}</td>
						  </tr>
						</table>
						<div class="he"></div>
						<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
						  <tr>
						    <th width="110" align="right" bgcolor="#F8F8F8">出生日期：</th>
						    <td bgcolor="#F8F8F8">${resumeBasicInfo.birthday}</td>
						  </tr>
						</table>
						<div class="he"></div>
						<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
						  <tr>
						    <th width="110" align="right" bgcolor="#F8F8F8">手机：</th>
						    <td bgcolor="#F8F8F8">${resumeBasicInfo.telephone}</td>
						  </tr>
						</table>
						<div class="he"></div>
						<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
						  <tr>
						    <th width="110" align="right" bgcolor="#F8F8F8">邮件：</th>
						    <td bgcolor="#F8F8F8">${resumeBasicInfo.email}</td>
						  </tr>
						</table>
						<div class="he"></div>
						<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
						  <tr>
						    <th width="110" align="right" bgcolor="#F8F8F8">求职意向：</th>
						    <td bgcolor="#F8F8F8">${resumeBasicInfo.jobIntension}</td>
						  </tr>
						</table>
						<div class="he"></div>
						<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
						  <tr>
						    <th width="110" align="right" bgcolor="#F8F8F8">工作经验：</th>
						    <td bgcolor="#F8F8F8">${resumeBasicInfo.jobExperience}</td>
						  </tr>
						</table>
						<div class="he"></div>
					</div>
					<div style="float:right" class="uploade">
						<c:if test="${empty resumeBasicInfo.headShot}">
							<img src="<%=basePath %>images/person_img.jpg">
						</c:if>
						<c:if test="${!empty resumeBasicInfo.headShot}">
							<img src="<%=basePath %>applicant/images/${resumeBasicInfo.headShot}" alt="头像" width="110px" height="110px">
						</c:if>					
						<div align="center">
							<a href="<%=basePath %>applicant/resumeBasicInfoPicUpload.jsp" class="uploade_btn">更换照片</a>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</c:if>
			<div class="resume_title">
				<div style="float:left">教育经历</div>
				<%-- <div class="btn"><a href="<%=basePath %>applicant/resumeEducationAdd.jsp">添加</a></div> --%>
				<div class="btn"><a href="javascript:void(0)" onclick="educationShow()">添加</a></div>
			</div>
			
			<!-- 显示教育经历begin -->
			<div class="it-table-grid" id="educationShow">
		    	<ul>
			        <li class="tn-border-gray tn-border-bottom it-table-grid-header">
			            <p class="tn-name">
			                毕业院校</p>
			            <p class="tn-date">
			                就读时间</p>
			            <p class="tn-degree">
			                学历</p>
			            <p class="tn-fieldofstudy">
			                专业</p>
			        </li>
			        <c:if test="${!empty eduList}">
				        <c:forEach items="${eduList}" var="edu">
				        	<li class="tn-border-gray tn-border-bottom">
					            <p class="tn-name" title="青软实训">
					               	${edu.school }	                   
					            </p>
					            <p class="tn-date">${edu.beginTime }</p>
					            <p class="tn-degree" title="">
					                 ${edu.schooling }
					            </p>
					            <p class="tn-fieldofstudy" title="软件工程">
					               	${edu.profession }
					            </p>
					            <span class="tn-actions">
						            <a href="#" class="tn-action tn-action-text-icon">
							            <span class="tn-icon it-icon-modify"></span>
							            <span class="tn-action-text"><a href="<%=basePath %>edu.do?type=update&education_id=${edu.education_id}">修改</a></span>
						            </a>
					            	<a href="" class="tn-action tn-action-text-icon tn-delete">
							            <span class="tn-icon it-icon-delete"></span>
							            <span class="tn-action-text"><a href="<%=basePath %>edu.do?type=delete${edu.education_id}">删除</a></span>
					            	</a>
					            </span>
					        </li> 
				        </c:forEach>
			        </c:if>
			 	</ul>
			 </div>	
			 
			 <!-- 显示教育经历end -->
			 
			 <!-- 显示教育经历添加begin -->
			 <div class="it-table-grid" id="educationAdd" style="display: none;">
				<form action="<%=basePath %>edu.do?type=add" method="post">
					<div class="all_resume" style="margin-left: 100px">
						<div class="table_style">
							<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
							  <tr>
							    <th width="110" align="right" bgcolor="#F8F8F8">毕业院校：</th>
							    <td bgcolor="#F8F8F8"><input type="text" name="school" id="school"></td>
							  </tr>
							</table>
							<div class="he"></div>
							<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
							  <tr>
							    <th width="110" align="right" bgcolor="#F8F8F8">就读时间：</th>
							    <td bgcolor="#F8F8F8"><input type="text" name="beginTime" id="beginTime"></td>
							  </tr>
							</table>
							<div class="he"></div>
							<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
							  <tr>
							    <th width="110" align="right" bgcolor="#F8F8F8">学历：</th>
							    <td bgcolor="#F8F8F8"><input type="text" name="schooling" id="schooling"></td>
							  </tr>
							</table>
							<div class="he"></div>
							<table width="300" border="0" cellpadding="3" cellspacing="1" bgcolor="#EEEEEE">
							  <tr>
							    <th width="110" align="right" bgcolor="#F8F8F8">专业：</th>
							    <td bgcolor="#F8F8F8"><input type="text" name="profession" id="profession"></td>
							  </tr>
							</table>					
							<div class="he"></div>
							<div style="margin-left:100px;">
								<input name="" type="button" class="save1" value="保存"> 
								<input name="" type="reset" class="cancel2" value="取消">
							</div>
						</div>
						<%-- <div style="float:right" class="uploade"><img src="<%=basePath %>/images/person_img.jpg">
							<div align="center">
								<a href="#" class="uploade_btn">更换照片</a>
							</div>
						</div> --%>
						<div class="clear"></div>
					</div>
				</form>
			</div>			        
			<!-- 显示教育经历添加end -->		
			

			<div class="resume_title">
				<div style="float:left">工作经历</div>
				<div class="btn">添加</div>
			</div>
			<div class="it-table-grid">
		    	<ul>
			        <li class="tn-border-gray tn-border-bottom it-table-grid-header">
			            <p class="tn-name">
			                工作公司	</p>
			            <p class="tn-date">
			                在职时间</p>
			            <p class="tn-degree">
			                部门</p>
			            <p class="tn-fieldofstudy">
			                职位名称</p>
			        </li>
					<li class="tn-border-gray tn-border-bottom">
			            <p class="tn-name" title="青软实训">
			                青软实训                   
			            </p>
			            <p class="tn-date">2013/10-2014/10</p>
			            <p class="tn-degree" title="">
			                 研发部
			            </p>
			            <p class="tn-fieldofstudy" title="软件工程">
			                软件开发工程师
			            </p>
			            <span class="tn-actions"><a href="#" class="tn-action tn-action-text-icon">
			            <span class="tn-icon it-icon-modify"></span><span class="tn-action-text">修改</span>
			            </a>
			            <a href="" class="tn-action tn-action-text-icon tn-delete">
			            <span class="tn-icon it-icon-delete"></span><span class="tn-action-text">删除</span>
			            </a></span></li>    
		       
				</ul>
			</div>

			<div class="resume_title">
				<div style="float:left">项目经验</div>
				<div class="btn">添加</div>
			</div>
			<div class="it-table-grid">
		    	<ul>
			        <li class="tn-border-gray tn-border-bottom it-table-grid-header">
			            <p class="tn-name">
			                项目名称	</p>
			            <p class="tn-date">
			                参与时间</p>
			            <p class="tn-degree">
			                担任职位</p>
			        </li>
					    
		       
				</ul>
			</div>
			<div class="resume_title">
				<div style="float:left">培训经历</div>
				<div class="btn">添加</div>
			</div>
			<div class="it-table-grid">
		    	<ul>
			        <li class="tn-border-gray tn-border-bottom it-table-grid-header">
			            <p class="tn-name">
			                培训名称	</p>
			            <p class="tn-date">
			                培训时间</p>
			            
			        </li>

		       
				</ul>
			</div>
			<div class="resume_title">
				<div style="float:left">获得证书</div>
				<div class="btn">添加</div>
			</div>
			<div class="it-table-grid">
		    	<ul>
			        <li class="tn-border-gray tn-border-bottom it-table-grid-header">
			            <p class="tn-name">
			                证书名称	</p>
			            
			        </li>

		       
				</ul>
			</div>
			<div class="resume_title">
				<div style="float:left">语言能力</div>
				<div class="btn">添加</div>
			</div>

			<div class="it-table-grid">
		    	<ul>
			        <li class="tn-border-gray tn-border-bottom it-table-grid-header">
			            <p class="tn-name">
			                语言	</p>
			            <p class="tn-date">
			                听说</p>
			            <p class="tn-degree">
			                读写</p>
			            <p class="tn-fieldofstudy">
			                等级考试</p>
			        </li>
					<li class="tn-border-gray tn-border-bottom">
			            <p class="tn-name" title="英语">
			                英语                   
			            </p>
			            <p class="tn-date">熟练</p>
			            <p class="tn-degree" title="">
			                 熟练
			            </p>
			            <p class="tn-fieldofstudy" title="CET-6">
			                CET-6
			            </p>
			            <span class="tn-actions"><a href="#" class="tn-action tn-action-text-icon">
			            <span class="tn-icon it-icon-modify"></span><span class="tn-action-text">修改</span>
			            </a>
			            <a href="" class="tn-action tn-action-text-icon tn-delete">
			            <span class="tn-icon it-icon-delete"></span><span class="tn-action-text">删除</span>
			            </a></span></li>    
		       
				</ul>
			</div>	
			<div class="resume_title">
				<div style="float:left">IT技能</div>
				<div class="btn">添加</div>
			</div>
			<div class="it-table-grid">
		    	<ul>
			        <li class="tn-border-gray tn-border-bottom it-table-grid-header">
						<p class="tn-auto">
		                技能名称</p>

			            <p class="tn-name">
		                熟练程度</p>
			        </li>
					<li class="tn-border-gray tn-border-bottom">
			            <p class="tn-auto">
		                    Oracle</p>
			            <p class="tn-name">
		                    熟练</p>
			            <span class="tn-actions"><a href="#" class="tn-action tn-action-text-icon">
			            <span class="tn-icon it-icon-modify"></span><span class="tn-action-text">修改</span>
			            </a>
			            <a href="" class="tn-action tn-action-text-icon tn-delete">
			            <span class="tn-icon it-icon-delete"></span><span class="tn-action-text">删除</span>
			            </a></span></li>    
					<li class="tn-border-gray tn-border-bottom">
			            <p class="tn-auto">
		                    JavaEE</p>
			            <p class="tn-name">
		                    熟练</p>
			            <span class="tn-actions"><a href="#" class="tn-action tn-action-text-icon">
			            <span class="tn-icon it-icon-modify"></span><span class="tn-action-text">修改</span>
			            </a>
			            <a href="" class="tn-action tn-action-text-icon tn-delete">
			            <span class="tn-icon it-icon-delete"></span><span class="tn-action-text">删除</span>
			            </a></span></li>    
					<li class="tn-border-gray tn-border-bottom">
			            <p class="tn-auto">
		                    Java</p>
			            <p class="tn-name">
		                    熟练</p>
			            <span class="tn-actions"><a href="#" class="tn-action tn-action-text-icon">
			            <span class="tn-icon it-icon-modify"></span><span class="tn-action-text">修改</span>
			            </a>
			            <a href="" class="tn-action tn-action-text-icon tn-delete">
			            <span class="tn-icon it-icon-delete"></span><span class="tn-action-text">删除</span>
			            </a></span></li>    
		       
				</ul>
			</div>	
			<div class="resume_title">
				<div style="float:left">其他信息</div>
				<div class="btn">添加</div>
			</div>
			<div class="it-table-grid">
		    	<ul>
			        <li class="tn-border-gray tn-border-bottom it-table-grid-header">
			            <p class="tn-name">
		                标题</p>
			            <p class="tn-auto">
		                描述</p>
			        </li>


		       
				</ul>
			</div>
			<div class="resume_title">
				<div style="float:left">简历附件</div>
				<div class="btn">添加</div>
			</div>
			<div class="it-table-grid">
				<div class="it-table-grid">
					暂无附件！</div>
			</div>	

		
	    </div>
    	<!--右边-->
		<jsp:include page="resume_right.jsp"></jsp:include>

		<div style="clear:both"></div>
	</div>
</div>

<jsp:include page="../foot.jsp"></jsp:include>
</body>
</html>
